#pragma once
#include "bevdet_tensortrt/iou3d_nms.h"
#include <interface/msg/images.hpp>
#include <interface/msg/object.hpp>
#include <interface/msg/objects.hpp>
#include <rclcpp/rclcpp.hpp>
#include <sensor_msgs/msg/image.hpp>
namespace camera_perception {

class CameraPerception;
class CameraAdapter : public rclcpp::Node {

public:
    explicit CameraAdapter(std::string name);
    void bevdetOneObjects(const std::vector<Box> boxs);
    void bevdetMockOneObjects(const std::vector<Box> boxs);

private:
    void onImages(std::shared_ptr<interface::msg::Images> msg);

private:
    rclcpp::Logger logger_;

    std::shared_ptr<CameraPerception> cameraPerceptionSptr_ { nullptr };

    rclcpp::Publisher<interface::msg::Objects>::SharedPtr bevDetPubPtr_;

    std::shared_ptr<rclcpp::Subscription<interface::msg::Images>> imageSReceiverSptr_;
};

}